package edu.bbu.commonproject.desktop.gui.view.swing.login;

import java.awt.Dimension;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JLayeredPane;
import javax.swing.JPanel;
import javax.swing.JPasswordField;
import javax.swing.JTextField;

/**
 * The panel, where are palced the other panels.
 */
public class CenterCollectionPanel extends JLayeredPane
{
	/** The login panel. */
	private LoginPanel loginPanel;
	
	/** The register panel. */
	private RegisterPanel registerPanel;
	
	/** The forgot password panel. */
	private ForgotPasswordPanel fPasswordPanel;
	
	/**
	 * The constructor.
	 */
	public CenterCollectionPanel()
	{
		this.setPreferredSize(new Dimension(600,400));
		setComponents();
	}	
	
	/**
	 * Sets up the components.
	 */
	private void setComponents()
	{
		loginPanel = new LoginPanel();		
		this.add(loginPanel, 0);
		registerPanel = new RegisterPanel();
		this.add(registerPanel, 0);
		fPasswordPanel = new ForgotPasswordPanel();
		this.add(fPasswordPanel, 0);
		
		this.moveToFront(loginPanel);
		
		loginPanel.setVisible(true);
		registerPanel.setVisible(false);
		fPasswordPanel.setVisible(false);
	}
	
	/**
	 * Gets the login panel.
	 * @return the login panel.
	 */
	public LoginPanel getLoginPanel()
	{
		return loginPanel;
	}
	
	/**
	 * Gets the register panel.
	 * @return the register panel.
	 */
	public RegisterPanel getRegisterPanel()
	{
		return registerPanel;
	}

	/**
	 * Gets the forgoton password panel.
	 * @return the forgoton password panel.
	 */
	public ForgotPasswordPanel getForgotPasswordPanel()
	{
		return fPasswordPanel;
	}	
	
}
